use std::collections::HashSet;

pub fn new_count_distinct(input_str: &str) -> usize {
    let input_vec: Vec<&str> = input_str.split(',').collect();
    let mut cnt = 0;
    let mut set = HashSet::new();
    for element in input_vec {
        if !set.contains(element) {
            set.insert(element);
            cnt += 1;
        }
    }
    cnt
}
